package webSpider.webMagic;

import us.codecraft.webmagic.Spider;
import us.codecraft.webmagic.pipeline.ConsolePipeline;

public class Main {
    public static void main(String[] args) {

        Spider.create(new NuomiPageProcessor())
                //抓取周杰伦百度百科
                .addUrl("https://baike.baidu.com/item/%E5%91%A8%E6%9D%B0%E4%BC%A6/129156")
//                .addUrl("https://wx.zsxq.com/dweb2/index/topic_detail/182848288282882")
//                .addUrl("https://www.baidu.com/")
                .addPipeline(new ConsolePipeline())
                //开启5个线程抓取
                .thread(5)
                //启动爬虫
                .run();
    }
}
